import axios from 'axios'
import constUrl from './const.json'
async function httpPost (pkg) {
  const params = new FormData()
  params.append('gdData', JSON.stringify(pkg))
  const res = await axios({
    url: constUrl.url,
    method: 'post',
    data: params,
    headers: {
      Accept: '*/*',
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
      'X-Requested-With': 'XMLHttpRequest'
    }
  })
  return res
}
export default httpPost
